package demo2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-08-23  12:31
 */
public class Test {
    public static void main(String[] args) {
        Computer computer = new Computer();
        computer.powerOn();

        Mouse mouse = new Mouse();
        computer.useComputer(mouse);
        KeyBoard keyBoard = new KeyBoard();
        computer.useComputer(keyBoard);

        computer.poweroff();
    }
}
